//@ts-ignore
import * as lib from "libseven_zip.so";
import { FileInfo } from "./FileInfo";

export class Decompress {
  static readEntries(srcPath: string, passwd: string): Promise<Array<FileInfo>> {
    return lib.Decompress.readEntries(srcPath, passwd);
  }

  static decompressFile(srcPath: string, dest: string): Promise<void> {
    return lib.Decompress.decompressFile(srcPath, dest);
  }

  static decompressFileWithPassword(srcPath: string, dest: string, passwd: string): Promise<void> {
    return lib.Decompress.decompressFileWithPassword(srcPath, dest, passwd);
  }
}